InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > المنتدى العام لكلية الحاسبات وتقنية المعلومات > منتدى الملخصات والمواضيع المميزة بالقسم العام لكلية الحاسبات وتقنية المعلومات
   
   


منتدى الملخصات والمواضيع المميزة بالقسم العام لكلية الحاسبات وتقنية المعلومات قسم خاص يتم نقل المواضيع المميزة و الملخصات والملفات المهمه

Cpcs 202 شروحات وحلول وواجبات الجافا

منتدى الملخصات والمواضيع المميزة بالقسم العام لكلية الحاسبات وتقنية المعلومات

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 17-11-2011, 02:32 PM   #11

deathpain

devkemo

الصورة الرمزية deathpain

 
تاريخ التسجيل: Dec 2010
كلية: كلية الحاسبات وتقنية المعلومات
التخصص: Computer Science
نوع الدراسة: إنتظام
المستوى: الثامن
البلد: جــــدة
الجنس: ذكر
المشاركات: 770
افتراضي رد: Cpcs 202 شروحات وحلول وواجبات الجافا

بناءً على طلب بعض الأعضاء راح أضع حل البروجكت الاول هنا،
أول شيء ملف تفاصيل البروجكت:
http://asifkhan.co.cc/Documents/Project_one_CPCS202.doc
الحل بالتفصيل:
كود PHP:
import java.util.*;

public class 
ProjectOneCPCS202 {

    public static 
void main(String[] args) {
    
String Name// الاسم
    
short Service// نوع الخدمة
    
Long Account// رقم الحساب
    
int billNum// رقم الفاتورة
    
int OldMtrRdng// قراءة العداد القديمة
    
int NewMtrRdng// قراءة العداد الجديدة
    
String Month// الشهر
    
double unpaid// المبلغ غير المسدد
    
double currentblnc// مجموع المبلغ الحالي
    
double otherchrgs// مبالغ أخرى
    
double Total// معدل الاستهلاك 
    
double RatePerUnit=0// معدل التكلفة للوحدة
    
    
Scanner in1=new Scanner(System.in);
    
System.out.println("Enter name of owner Name of Apartment or Flat or Shop:");
    
Name in1.nextLine();
    
    
System.out.println("Enter (1)for Residential, (2)for Commercial, (3)for Governmental, (4)for Agricultural, (5)for Charities, (6)for Private educational establishments, (7)for Private health establishments");
    
Service in1.nextShort();
    
    
System.out.println("Enter account Number:");
    
Account in1.nextLong();
    
    
System.out.println("Enter Bill Number:");
    
billNum in1.nextInt();
    
    
System.out.println("Enter Old Meter Reading:");
    
OldMtrRdng in1.nextInt();
    
    
System.out.println("Enter New Meter Reading:");
    
NewMtrRdng in1.nextInt();
    while (
NewMtrRdng OldMtrRdng){
        
System.out.println("New meter reading cannot be less than old meter reading");
        
System.out.println("Enter New Meter Reading again:");
    
NewMtrRdng in1.nextInt();}
    
    
System.out.println("Enter Bill Month:");
    
Month in1.next();
    
    
System.out.println("Enter any unpaid balance:");
    
unpaid in1.nextDouble();
    while (
unpaid<0){
        
System.out.println("Unpaid amount cannot be less than zero");
        
System.out.println("Enter any unpaid balance again:");
    
unpaid in1.nextDouble();}
    
    
System.out.println("Enter any other charges:");
    
otherchrgs in1.nextDouble();
    while (
otherchrgs<0){
        
System.out.println("Other Charges cannot be less than zero");
        
System.out.println("Enter any other charges again:");
    
otherchrgs in1.nextDouble();}
    
    
Total NewMtrRdng-OldMtrRdng;
    
    
// Residential Service خدمة سكنية
    
if (Service==1) {
    if (
Total >= && Total <=2000)
    
RatePerUnit=5;
    else if (
Total >= 2001 && Total <=4000)
    
RatePerUnit=10;
    else if (
Total >= 4001 && Total <=6000)
    
RatePerUnit=12;
    else if (
Total >= 6001 && Total <=7000)
    
RatePerUnit=15;
    else if (
Total >= 7001 && Total <=8000)
    
RatePerUnit=20;
    else if (
Total >= 8001 && Total <=9000)
    
RatePerUnit=22;
    else if (
Total >= 9001 && Total <=10000)
    
RatePerUnit=24;
    else if (
Total 10000)
    
RatePerUnit=26; }
    
    
// Commercial Service خدمة تجارية
    
else if (Service==2){
        if (
Total >= && Total <=4000)
    
RatePerUnit=12;
    else if (
Total >= 4001 && Total <=8000)
    
RatePerUnit=20;
    else if (
Total >= 8001)
    
RatePerUnit=26; }
    
   
// Governmental Service خدمة حكومية
    
else if (Service==3) {
        if (
Total >= )
    
RatePerUnit=26; }
    
  
// Agricultural Service خدمة زراعية
    
else if (Service==4) {
        if (
Total >= && Total <=2000)
    
RatePerUnit=5;
    else if (
Total >= 2001 && Total <=5000)
    
RatePerUnit=10;
    else if (
Total >= 5001)
    
RatePerUnit=12;}
    
  
// Charities Service خدمة خيرية
    
else if (Service==5) {
        if (
Total >= && Total <=2000)
    
RatePerUnit=5;
    else if (
Total >= 2001 && Total <=5000)
    
RatePerUnit=10;
    else if (
Total >= 5001)
    
RatePerUnit=12;}
    
   
// Private Educational Establishments Service خدمة المؤسسات التعليمية الخاصة
    
else if (Service==6) {
        if (
Total >= 1)
    
RatePerUnit=12; }
    
// Private Health Establishments Service خدمة المؤسسات الصحية الخاصة
    
else if (Service==7) {
        if (
Total >= 1)
    
RatePerUnit=12; }
    
    
currentblnc = (RatePerUnit/100)*Total+unpaid+otherchrgs;
    
    
// Outputs المخرجات
    
System.out.println("                           Saudi Electricity Company                            ");
    
System.out.println("                                                         Bill Number: "+billNum);
    
System.out.println("Name: "+Name+"                              Bill Month: "+Month);
    
System.out.println("Old Meter Reading: "+OldMtrRdng+"                       Current Meter Reading: "+NewMtrRdng);
    
System.out.println("Total Consumption: "+Total+" Unit                 Rate Per Unit:"+RatePerUnit+" Halalah");
    
System.out.println("Unpaid Amount: "+unpaid+"                          Other Charges: "+otherchrgs);
    
System.out.println("Total Bill Payment: "+currentblnc+"                   Total Days: 30");
    
System.out.println("Note: You have to pay your bill withing 15 days of Bill Month");
    
System.exit(0); 
إذا كان في نقاط مو واضحة راح أشرحها

 

deathpain غير متواجد حالياً   رد مع اقتباس
 

 

أدوات الموضوع إبحث في الموضوع
إبحث في الموضوع:

البحث المتقدم
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 03:39 PM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2025